<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <script type="text/javascript" src="/lib/html5shiv.js"></script>
    <script type="text/javascript" src="/lib/respond.min.js"></script>
    <script type="text/javascript" src="/js/vue/vue.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/css/style.css" />
    <script type="text/javascript" src="/lib/respond.min.js"></script>

    <title>商品模板</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 云管货 <span
        class="c-gray en">&gt;</span> 商品模板 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
                                              href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c"> <!--日期范围：
        <input type="text" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin"
               class="input-text Wdate" style="width:120px;">
        -
        <input type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })" id="datemax"
               class="input-text Wdate" style="width:120px;">-->

    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">

         <a href="javascript:;" onclick="Excel_out()"
          class="btn btn-primary radius">
        <i class="Hui-iconfont">&#xe644;</i> Excel导出</a>
    </span>


    <div id="app" style="overflow: scroll;height: 500px"  >
        <table class="table table-border table-bordered table-bg">
            <thead>
            <tr>
                <th scope="col" colspan="9">商品模板</th>
            </tr>
            <tr class="text-c">

                <th width="40">序号</th>
                <th width="130">商品名称/规格</th>
                <th width="150">商品编号</th>
                <th width="150">属性</th>
                <th width="150">数量</th>
                <th width="150">单位</th>
            </tr>
            </thead>


            <tbody>
            <tr class="text-c" v-for="(item,index) in result">

                <td>{{item.id}}</td>
               <!-- <td>{{index+1}}</td>-->

                <td>{{item.clName}}</td>
                <td>{{item.clNumber}}</td>
                <td>{{item.ctTemplategoods}}</td>
                <td>{{item.ctRemarks}}</td>
            </tr>
            </tbody>
        </table>
    </div>
    <div id="pagenav" style="text-align: center"></div>
</div>
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
    var app = new Vue({
        el:'#app',
        data:{
            result:[]
        }
    });
    $(function () {
        $("#checkAl").click(function () {
            $("input[id^='box_']").attr("checked",this.checked);
        })
        $("input[id^='box_']").click(function(){//点击每一个子checkbox，都会触发这个事件
            /**获取到下面所有checkbox*/
            var boxs = $("input[id^='box_']");

            $("#checkAll").attr("checked",boxs.filter(":checked").length == 4);
        });
    });



    getPurchasePageList();
    $("#findempl").on('click', function () {
        getPurchasePageList();
    });


    /*删除账目*/
    var delEvent = function (id) {
        layer.confirm('你确定要删除吗？',{
            btn:['是','否']
        },function () {
            $.ajax({
                type:'GET',
                dataType:'json',
                url: '/activitymanagement/commodi-tytemplate/delete',
                data:{
                    id:id
                },
                success:function (msg) {
                    getPurchasePageList();
                    layer.msg('成功删除' + id,{icon:5});
                }
            })
        },function () {

        });
    };
    function detail(id) {
        var index = layer.open({
            type: 2,
            title: '详细',
            content: '/activitymanagement/commodi-tytemplate/edit?id='+id,
        });
        layer.full(index);
    };
    /*编辑修改*/
     function b(title,url){
        var index = layer.open({
            type: 2,
            title: title,
            content: url
        });
        layer.full(index);
    };
    /*添加*/
    var c =function (title,url,h,w) {
        layer.open({
            type:2,
            title:title,
            fix:false,
            maxmin:true,
            shadeClose:true,
            area:['1000px','800px'],
            content:url,
            end:function() {
                getUserPageList();
            }
        });
    }

    var Excel_out =function () {
        window.location.href="/activitymanagement/commodi-tytemplate/export1";
    }


</script>
</body>
</html>